package cn.yiyuan.base.monitor;

import cn.yiyuan.service.IPermissionScanService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

/**
 * @user m
 * @project system_boog
 * @date 2023-10-16
 * @package cn.yiyuan.base.monitor
 */
//监听器
/*
        ServletContextListener  监听器父接口

 */
@WebListener
public class Limits implements ServletContextListener {

    @Autowired
    private IPermissionScanService scanService;

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        System.out.println("监听器启动");
        scanService.scan();
        System.out.println("监听器关闭");
    }
}
